package com.team7.happycommunity.propertymanagement.pojo;

import lombok.Data;

import java.io.Serializable;

@Data
public class PpPayservice implements Serializable {
    private Integer id;

    private Integer propertyid;

    private Integer shopid;

    private String payname;

    private String payprice;

    private String paytime;

    private Integer status;

    private String icon;

    private Integer serviceType;

    private Integer payway;

    private String servicecontext;

    // 衍生属性 支付方式
    private String paywayStr;
    // 衍生属性 服务类型
    private String serviceTypeStr;

    public void setServiceType(Integer serviceType){
        this.serviceType = serviceType;
        if(serviceType !=null && serviceType == 0){
            serviceTypeStr = "商家服务";
        }else{
            serviceTypeStr = "物业服务";
        }
    }

    public void setPayway(Integer payway){
        this.payway = payway;
        if(payway == 0){
            paywayStr = "线上";
        }else{
            paywayStr = "线下";
        }
    }
}